﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BasicData.aspx.cs" Inherits="XMK.Tadong.Web.Farpoint.BasicData" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register assembly="FarPoint.Web.Spread, Version=7.40.20142.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" namespace="FarPoint.Web.Spread" tagprefix="FarPoint" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server" style="height:100%;margin:0;">
    <title></title>
    
    <script type="text/javascript" src="fp_client/fpspread/7_40_20142_0/HTC/FpSpreadJsIntellisense.js"></script>
<%--    <style type="text/css">
        html,body    {
        margin:0px;
        height:100%;
        
        }
        #deman
        {
        height:100%;
        background-color:#CCF;
        }
        .cc
        {
        background-color:#CCF;
        height:auto;
        }
    </style>--%>
     <script language="javascript" type="text/javascript">


         function FpSpread1_DataChanged(event) {
             //添加代码以处理该事件通知。
             //		    var btncacel = document.all("ImBtn_cancle");
             //		    var btnsave = document.all("ImBtn_save");
             //		    var btnupdate = document.all("ImBtn_update");
             //		    btnupdate.disabled = "false";
             //		    btncacel.disabled = "false";
             //		    btnsave.disabled = "false";

             //--------------------------------------将改变的数据放入固定列
             /*
             var rowValue=0;  //行计数器
             var colValue=0;  //列计数器
             var rowValueCount=0;  //已复制的行数
             var colValueCount=0;  //已复制的列数
             */
             //-------------------------------------------------------
             var iMess = window.clipboardData.getData("Text");
             var countrows = 1;
             var countcols = 1;
             var maxcols = 1;
             if (iMess != null && iMess != "") {
                 for (var i = 0; i < iMess.length; i++) {
                     var split = iMess.substring(i, i + 1);
                     switch (split) {
                         case "\r":
                             if (countcols > maxcols)
                                 maxcols = countcols;
                             countcols = 0;
                             if (i < iMess.length - 3)
                                 countrows = countrows + 1;
                             break;
                         case "\t":
                             countcols = countcols + 1;
                             break;
                     }
                 }
             }
             countcols = maxcols;
             //获取第几列数据需要设置为固定列
             var spread = document.all("FpSpread1");
             var f = document.Form1;

             var span = document.all("FpSpread1_rowHeader");
             var table = span.firstChild;

             var row = spread.ActiveRow;
             var col = spread.ActiveCol;
             var fixcolumn = document.getElementById("hid_fixcolumn");
             var fixcol = fixcolumn.value;
             //		    alert(fixcol);
             var Values = fixcol.split("#");
             for (var i = 0; i < Values.length; i++) {
                 if (spread.ActiveCol + colValue == Values[i] && Values[i] != "") {
                     var ModifyValue = spread.GetValue(spread.ActiveRow + rowValue, spread.ActiveCol + colValue);

                     table.rows(spread.ActiveRow + rowValue + 1).cells(i + 1).innerText = ModifyValue;
                     break;
                 }
             }
             colValue = colValue + 1;
             if ((colValue % countcols) == 0) {
                 colValue = 0;
                 rowValue = rowValue + 1;
             }
             //修改数据后设置颜色
             //		    var view_row = document.all("FpSpread1_view");
             //		    var table_row = view_row.firstChild;
             //		    var tr_row = table_row.rows(row + 1);
             //tr_row.style.backgroundColor = "LightGreen";
             //            if (tr_row.style.backgroundColor != "LightGreen" && tr_row.style.backgroundColor != "Orange")
             //                tr_row.style.backgroundColor = "LightGoldenrodYellow";

         }

         function SpreadActiveRowChanged() {
             var spread = document.all("FpSpread1");
             var ActiveRowIndex = spread.ActiveRow;
             if (ActiveRowIndex > -1) {
                 var FieldCount = document.all["FieldCount"].value;
                 k = 0;
                 for (i = 0; i < FieldCount; i++) {
                     var txtname = "txt_" + i;
                     if (document.all[txtname]) {
                         var h = document.all[txtname];

                         if ((h.attributes["type"] != undefined) && (h.attributes["type"].value == "checkbox")) {
                             var ivalue = spread.GetValue(ActiveRowIndex, k++);
                             //  alert(ivalue)
                             if (ivalue == "true")
                                 h.checked = 1;
                             else
                                 h.checked = 0;
                         }
                         else {
                             h.value = spread.GetValue(ActiveRowIndex, k++);
                         }
                     }
                 }
                 var FpSpread = document.all["FpSpread1_viewport"];

                 for (i = 0; i < FpSpread.rows.length; i++) {
                     if (i == ActiveRowIndex) {
                         FpSpread.rows(i).style.backgroundColor = 'Linen';
                     }
                     else
                         FpSpread.rows(i).style.backgroundColor = 'white';
                 }

                 var FpSpread2 = document.all["FpSpread1_viewport2"];

                 if (FpSpread2 == "undefined" || FpSpread2 == null)
                     return;
                 else {
                     for (i = 0; i < FpSpread2.rows.length; i++) {
                         if (i == ActiveRowIndex) {
                             FpSpread2.rows(i).style.backgroundColor = 'Linen';
                         }
                         else
                             FpSpread2.rows(i).style.backgroundColor = 'white';
                     }
                 }

             }

         }
         function FpSpread1_SelectionChanged(event) {
             //添加代码以处理该事件通知。

             SpreadActiveRowChanged();

             //            var btnupdate = document.all("ImBtn_update");
             //            var btncopy = document.all("ImBtn_copy");
             //            var btncut = document.all("ImBtn_cut");
             //            var btnpaste = document.all("ImBtn_paste");
             //            var btndelete = document.all("ImBtn_delete");
             //            var btnadd = document.all("ImBtn_add");
             //            var btnsave = document.all("ImBtn_save");
             //            var btnpasteadd = document.all("ImBtn_pasteadd");

             //            btnupdate.disabled = "false";
             //            btncopy.disabled = "false";
             //            btncut.disabled = "false";
             //            btnpaste.disabled = "false";
             //            btndelete.disabled = "false";
             //            btnadd.disabled = "false";
             //            btnsave.disabled = "false";
             //            btnpasteadd.disabled = "false";

             //----------------------------------------------设置固定列
             rowValue = 0;  //行计数器
             colValue = 0;  //列计数器

             //为批量删除数据,客户端记录所选中的行和行数
             var rg = FpSpread1.GetSelectedRange();
             var spread = FpSpread("FpSpread1");
             var rg2 = spread.GetSelectedRanges();
             document.all["Selectrows"].value = rg.row + "#" + rg.col + "#" + rg.rowCount + "#" + rg.colCount;

         }

         //撤销更改
         function btnCancelClick() {
             var spread = FpSpread("FpSpread1");
             spread.Cancel();
             return false;
         };

         //追加复制
         function btnPasteAddClick() {
             var vkid = document.all("hidKid");
             vkid.value = window.clipboardData.getData("Text");
             if (vkid.value == null) {
                 return false;
             }
         };
         //         //删除按钮
         //         function btnDeleteClick() {
         //             if (confirm("你确定要删除记录吗?")) {
         //                 return true;
         //             }
         //             else {
         //                 return false;
         //             }
         //         }

         var btnKeyClick = function (btnname) {
             if (btnname.pressed == true) {
                 alert("btnname.Pressed = true");
             }
             else {
                 alert("btnname.Pressed = false");
             }
         };
         //添加空行
         function btnAddNullRowClick(btnname) {
             var i = FpSpread1.GetRowCount();

             var FieldCount = document.all["FieldCount"].value;
             FpSpread1.Add(i, 1);
             FpSpread1.SetActiveCell(i, 0);
             SpreadActiveRowChanged();
             for (i = 0; i < FieldCount; i++) {
                 if (document.all[txtname]) {
                     var txtname = "txt_" + i;
                     var input = document.getElementById(txtname);
                     if (input.getAttribute('disabled')) {
                         input.removeAttribute('disabled');
                     }
                 }
             }
         };
         //复制数据
         function btnCopyClick() {
             var spread = FpSpread("FpSpread1");
             spread.Copy();
             return false;
         };
         //粘贴数据
         function btnPasteClick() {
             var spread = FpSpread("FpSpread1");
             spread.Paste();

             return false;
         };
         //剪切数据
         function btnCutClick() {
             var spread = FpSpread("FpSpread1");
             spread.Clear();
             return false;
         };
         //选择忽略主键冲突
         function chkIgnoreKeyClick() {
             var chkKey = document.all("chkIgnoreKey");
             chkKey.checked = !chkKey.checked;
             return false;
         }
         //刷新按钮
         function btnRefreshClick() {
             if (confirm("刷新之后未保存数据将丢失，是否继续?")) {
                 return true;
             }
             else {
                 return false;
             }
         }
         //显示数据源配置页面
         function ShowDBSourceWin_Button() {
             var bdm = document.getElementById("hidBDM");
             var strReturn = window.showModalDialog("frame.htm", "ConfigDataSource.aspx?tablecode=" + bdm.value, "font-size:10px;dialogWidth:650px;dialogHeight:560px;status=no;center=yes;resizable=no;");
             if (strReturn == "Y") {
                 document.getElementById("btnRun").click();
             }
         }

         function FpSpread1_EditStart(event) {
             //添加代码以处理该事件通知。
             return false;
         }

         //输入框控制只能够输入数字
         function onlyNum(obj) {
             //控制多个小数点的输入       
             var objs = obj.value.split(".");
             if (objs.length == 2 && event.keyCode == 190)
                 event.returnValue = false;
             else {
                 //控制只输入数字和小数点  
                 if (!((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 190 || event.keyCode == 110 || event.keyCode == 37 || event.keyCode == 39))
                     event.returnValue = false;
             }
         }
         //表单数据与网格动态绑定
         function BindDataToGrid(obj, k, DataType) {

             var ActiveRowIndex = FpSpread1.ActiveRow;
             if (obj.value != "") {
                 // alert(obj.checked);
                 if (obj.type != 'checkbox') {
                     if (DataType == "N") {
                         FpSpread1.SetValue(ActiveRowIndex, k, parseFloat(obj.value), "");
                     }
                     else {
                         FpSpread1.SetValue(ActiveRowIndex, k, obj.value, "");
                     }
                 }
                 else {
                     if (obj.checked)
                         FpSpread1.SetValue(ActiveRowIndex, k, "true", "");
                     else
                         FpSpread1.SetValue(ActiveRowIndex, k, "false", "");
                 }
             }
             else {
                 FpSpread1.SetValue(ActiveRowIndex, k, obj.value, "");
             }
         }


         var rowValue = 0;  //行计数器
         var colValue = 0;  //列计数器
         var isChange = false;
         var value_temp;
         var DataFrame = null;
         var x = 0;
         var y = 0;
         var ActiveRowIndex = -1;
         var ActiveColIndex = -1;


         //双击待计算行,弹出计算界面
         function spreaddblclick() {
             ActiveColIndex = FpSpread1.ActiveCol;
             ActiveRowIndex = FpSpread1.ActiveRow;

             if (ActiveColIndex == "-1" || ActiveRowIndex == "-1") {
                 return;
             }
             var BDM = document.all["hidBDM"].value;
             var FieldCount = document.all["hidVisibleFieldCount"].value;

             if (BDM == "" || FieldCount == 0) {
                 return;
             }
             else {
                 for (i = 0; i < FieldCount; i++) {
                     if (ActiveColIndex == i) {

                         //  x = event.x;
                         //   y = event.y;
                         //获取待计算参数
                         //  PageMethods.GetDataFieldFactor(h.title + "," + h.zdid, GetDataFieldFactorList);

                         var hidPop = document.all["hidPopField"];
                         if (hidPop) {
                             var Pop = hidPop.value;
                             if (Pop.indexOf(',' + (i + 1).toString() + ':') >= 0) {
                                 //Pop形如  ,9:TEXT-YC_TEXT,8:FILE-YC_FILE,
                                 var pTmp = Pop.substring(1, Pop.length - 1);
                                 var split1 = pTmp.split(',');
                                 for (m = 0; m < split1.length; m++) {
                                     var split2 = split1[m].split(':');
                                     if (split2[0] == (i + 1).toString()) {
                                         ShowSubWin(split2[1]);
                                         return;
                                     }
                                 }
                             }
                             else
                                 return;
                         }
                         else
                             return;

                     }
                 }
             }
         }
         //以下两个函数ShowSubWin 和 ShowSubWin_Button的功能是一样的，都是处理弹出窗口录入，ShowSubWin是在FARPOINT单元格中鼠标双击时触发，ShowSubWin_Button是FORM表单上的对应按钮触发
         function ShowSubWin(p_Type) {
             var oldValue = FpSpread1.GetValue(ActiveRowIndex, ActiveColIndex);
             var split1 = p_Type.split('-'); //TEXT-YC_TEXT
             var strType = split1[0];
             var strSubTab = split1[1];
             var strColName = split1[2];
             var strPage;
             if (strType == "TEXT") {
                 strPage = "CommonDataAdmin_TEXT.aspx";
             }
             else if (strType == "FILE") {
                 strPage = "CommonDataAdmin_FILE.aspx";
             }
             //alert(strPage + "?SUBTAB=" + strSubTab + "&ID=" + oldValue);
             var strReturn = showModalDialog("frame.htm", strPage + "?SUBTAB=" + strSubTab + "&ID=" + oldValue + "&COLNAME=" + strColName, "font-size:10px;dialogWidth:510px;dialogHeight:330px;status=no;center=yes;resizable=no;");
             if ((strReturn == "N/A") || (strReturn == undefined)) {

             }
             else {
                 FpSpread1.SetValue(ActiveRowIndex, ActiveColIndex, strReturn, ""); // FpSpread1.SetActiveCell(ActiveRowIndex, ActiveColIndex - 1);

             }

         }

        
	</script>
   
</head>
<body style="height:100%;margin:0;" >

    <form id="form1" runat="server">
    <input id="FieldCount" type="hidden" runat="server" />
    <input id="hidBDM" type="hidden" runat="server" />
    <input id="Pkey" type="hidden" runat="server" />
    <input id="Selectrows" type="hidden" runat="server" />
    <input id="hidPopField" type="hidden" runat="server" />
    <input id="hidVisibleFieldCount" type="hidden" runat="server" />
    <input id="hidKid" type="hidden" runat="server" /><!-- 临时保存剪切板数据 -->
    <input id="hid_fixcolumn" type="hidden" runat="server" />

    <div runat="server" id="divExcel" style="background-image: url(images/toolsbg.gif); width:100%; border-bottom: gray thin solid; height: 32px; background-color: #e3eedf" >
       <div style=" width:800px">
        <table border="0" width="100%">
            <tr>
                <td style="width:200px" >
                    <asp:FileUpload ID="FileUpload1" runat="server" Width="200px" Height="22px" CssClass="input1" />
                </td>
                <td style="width:102px" >
                    <asp:Button ID="btnReadData" runat="server" Text='<%# lang.Get("Upload and import") %>'  onclick="btnReadData_Click" CssClass="submit" Width="102px" />                                      
                </td>
                <td style="width:90px">
                    <input id="btnConfigDB" onclick="javascript:ShowDBSourceWin_Button();" type="button" value='<%= lang.Get("Configuration data") %>' class="submit" />
                </td>
                <td style="width:90px">
                    <asp:Button ID="btnDownload" runat="server" CssClass="submit" 
                        onclick="btnDownload_Click" Text='<%# lang.Get("Download the currrent template") %>' Width="90px" />
                </td>
                 <td style="width:90px" >
                     <asp:Button ID="btnXZAllMB" runat="server" Text='<%# lang.Get("Download the all template") %>' Width="90px" 
                         CssClass="submit" onclick="btnXZAllMB_Click"  />                           
                </td>
                <td style="display:none"><asp:Button ID="btnRun" runat="server"  OnClick="btnRun_Click" Height="0px" Width="0px" CssClass="display:none;" /></td>
            </tr>
        </table>
        </div>
    </div>
                <div id="ToolBar" style="background-image: url(images/toolsbg.gif); width:100%; border-bottom: gray thin solid;
                    height: 24px; background-color: #e3eedf" runat="server">
                    <div style=" width:900px">
                    <table id="Table2" bordercolor="#b0c4de" cellpadding="0" style="height: 100%" border="0">
                        <tr>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_cancle" runat="server" ToolTip='<%# lang.Get("Undo edi") %>'
                                    ImageUrl="images/Cancel.gif" onclientclick="return btnCancelClick();"  />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_update" runat="server" ToolTip='<%# lang.Get("The data check") %>'
                                ImageUrl="images/Update.gif" onclick="ImBtn_update_Click" />
                            </td>
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <TD style="WIDTH: 20px">
                                <asp:ImageButton ID="ImBtn_pasteadd" runat="server" ImageUrl="images/Add.gif" 
                                    ToolTip='<%# lang.Get("Additional duplicate records") %>' onclick="ImBtn_pasteadd_Click" onclientclick="return btnPasteAddClick();" />
                            </TD>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_add" runat="server" ImageUrl="images/new-1.gif" 
                                    ToolTip='<%# lang.Get("Additional a single record") %>' onclick="ImBtn_add_Click"   />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_save" runat="server" ImageUrl="images/Save.gif" 
                                    ToolTip='<%# lang.Get("Save the data") %>' onclick="ImBtn_save_Click" />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_delete" runat="server" 
                                    ImageUrl="images/Delete.gif" ToolTip='<%# lang.Get("Delete record") %>' 
                                    onclick="ImBtn_delete_Click" />
                            </td>
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_copy" runat="server" ImageUrl="images/Copy.gif" ToolTip='<%# lang.Get("Data replication") %>'
                                onclientclick="return btnCopyClick();" />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_paste" runat="server" ImageUrl="images/Paste.gif"  ToolTip='<%# lang.Get("Paste the data") %>'
                                onclientclick="return btnPasteClick();" />
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_cut" runat="server" ImageUrl="images/Cut.gif" ToolTip='<%# lang.Get("Cut data") %>'
                                onclientclick="return btnCutClick();" />
                            </td >
                            <td style="width: 20px">
                                <asp:CheckBox id="chkIgnoreKey" runat="server" BackColor="#F0EEE6" Checked="True" 
                                ToolTip='<%# lang.Get("Ignore the primary key conflict:If you ignore the primary key conflict is to retain the old data, ignore the new data.") %>' Font-Size="10pt">
                                </asp:CheckBox>
                            </td>
                            <td style="width: 20px">
                                <asp:ImageButton ID="ImBtn_key" runat="server" ToolTip='<%# lang.Get("Ignore the primary key conflict:If you ignore the primary key conflict is to retain the old data, ignore the new data.") %>'
                                onclientclick="return chkIgnoreKeyClick();" ImageUrl="images/bar_05.gif" />
                            </td>
                            
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <td style="width: 16px">
                                <asp:ImageButton ID="btnFirstPage" runat="server" 
                                ImageUrl="images/First.gif" ToolTip='<%# lang.Get("The first page") %>' 
                                onclick="btnFirstPage_Click" />
                            </td >
                            <td style="width: 16px">
                                <asp:ImageButton ID="btnPreviousPage" runat="server" 
                                    ImageUrl="images/Previous.gif" ToolTip='<%# lang.Get("Delete record") %>' 
                                    onclick="btnPreviousPage_Click" />
                            </td >
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <td style="width: 20px">
                                <asp:Label ID="Label1" runat="server" Text='<%# lang.Get("The:") %>' Font-Size="10pt"></asp:Label>
                            </td >
                            <td style="width: 10px">
                                <asp:Label ID="lblCurPage" runat="server" Text="1" Font-Size="10pt"></asp:Label>
                                <%--<asp:TextBox ID="txtCurPage" runat="server" Width="16%">1</asp:TextBox>--%>
                            </td >
                            <td style="width: 95px">
                                <div>
                                    <asp:Label ID="lbTotalPageNum" runat="server" Text='<%# lang.Get("Page,total page") %>' Font-Size="10pt"></asp:Label>
                                </div>
                            </td >
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <td style="width: 16px">
                                <asp:ImageButton ID="btnNextPage" runat="server" ImageUrl="images/Next.gif" 
                                    ToolTip='<%# lang.Get("Next page") %>' onclick="btnNextPage_Click" />
                            </td >
                            <td style="width: 16px">
                                <asp:ImageButton ID="btnLastPage" runat="server" ImageUrl="images/last.gif" 
                                    ToolTip='<%# lang.Get("The last page") %>' onclick="btnLastPage_Click" />
                            </td >
                            <td style="width: 5px">
                                <img alt="" src="images/spertor.gif" />
                            </td>
                            <td style="width: 16px">
                                <asp:ImageButton ID="btnRefresh" runat="server" ImageUrl="images/Refresh.gif" 
                                    ToolTip='<%# lang.Get("Refresh=") %>' onclientclick="return btnRefreshClick();" 
                                    onclick="btnRefresh_Click" />
                            </td >
                             <td style="width: 60px">
                                <asp:Label ID="Label2" runat="server" Text='<%# lang.Get("The page number of lines") %>' Font-Size="10pt"></asp:Label>
                            </td >
                            <td style="width: 50px">
                                <asp:DropDownList ID="cboYRowNum" runat="server" Width="50px" 
                                    AutoPostBack="True" onselectedindexchanged="cboYRowNum_SelectedIndexChanged">
                                    <asp:ListItem Selected="True">20</asp:ListItem>
                                    <asp:ListItem>30</asp:ListItem>
                                    <asp:ListItem>50</asp:ListItem>
                                    <asp:ListItem>100</asp:ListItem>
                                    <asp:ListItem>200</asp:ListItem>
                                    <asp:ListItem>500</asp:ListItem>
                                    <asp:ListItem>1000</asp:ListItem>
                                </asp:DropDownList>
                            </td >
                            <td style="width: 180px">
                            <div>
                                <asp:Label ID="lbCurPageInfo" runat="server" Text='<%# lang.Get("Display 1-5 slip,total 30 slips") %>' Font-Size="10pt"></asp:Label>
                                </div>
                            </td >
                        </tr>
                    </table>
                    </div>
                </div>

                <table style=" height:100%; width:100%;">
                <tr>
                <td>
                <div runat="server" id="divFpSpread" >
                          <FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid"
                            BorderWidth="1px" Height="600px" Width="100%">
                            <TouchInfo SelectionGripperLineColor=""></TouchInfo>
                                        <CommandBar BackColor="Control" ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight"
                                            ButtonShadowColor="ControlDark" Visible="False">
                            <Background BackgroundImageUrl="SPREADCLIENTPATH:/img/cbbg.gif"></Background>
                                        </CommandBar>
                                        <Sheets>
                                            <FarPoint:SheetView SheetName="Sheet1">
                                            </FarPoint:SheetView>
                                        </Sheets>
                            <TouchStrips>
                            <FarPoint:TouchStrip Area="Chart" NoTouchStrip="True"></FarPoint:TouchStrip>
                            </TouchStrips>
                                        <ClientEvents DataChanged="FpSpread1_DataChanged" 
                                            SelectionChanged="FpSpread1_SelectionChanged" />
                            <TitleInfo BackColor="#E7EFF7" ForeColor="" HorizontalAlign="Center" VerticalAlign="NotSet" Font-Size="X-Large"></TitleInfo>
                                    </FarPoint:FpSpread>
                  </div>
                </td>
                </tr>
                <tr>
                <td>
                    <div runat="server" id="divFpSpread_Error" style="height:250px; width:auto" visible="False">
                            <FarPoint:FpSpread ID="FpSpread_Error" runat="server" BorderColor="Black" BorderStyle="Solid"
                                BorderWidth="1px" Height="250px" Width="100%" ActiveSheetViewIndex="0" 
                                DesignString="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;Spread /&gt;">
                    <TouchInfo SelectionGripperLineColor=""></TouchInfo>

                                <CommandBar BackColor="Control" ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight"
                                    ButtonShadowColor="ControlDark" Visible="False">
                    <Background BackgroundImageUrl="SPREADCLIENTPATH:/img/cbbg.gif"></Background>
                                </CommandBar>
                                <Sheets>
                                    <FarPoint:SheetView SheetName="Sheet1" 
                                        DesignString="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;Sheet&gt;&lt;Data&gt;&lt;RowHeader class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;1&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;/RowHeader&gt;&lt;ColumnHeader class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;1&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;Cells&gt;&lt;Cell row=&quot;0&quot; column=&quot;0&quot;&gt;&lt;Data type=&quot;System.String&quot;&gt;提示信息表&lt;/Data&gt;&lt;/Cell&gt;&lt;/Cells&gt;&lt;/ColumnHeader&gt;&lt;DataArea class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;1&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;SheetName&gt;Sheet1&lt;/SheetName&gt;&lt;/DataArea&gt;&lt;SheetCorner class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;1&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;/SheetCorner&gt;&lt;ColumnFooter class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;1&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;/ColumnFooter&gt;&lt;/Data&gt;&lt;Presentation&gt;&lt;AxisModels&gt;&lt;Column class=&quot;FarPoint.Web.Spread.Model.DefaultSheetAxisModel&quot; orientation=&quot;Horizontal&quot; count=&quot;1&quot;&gt;&lt;Items&gt;&lt;Item index=&quot;-1&quot;&gt;&lt;SortIndicator&gt;Ascending&lt;/SortIndicator&gt;&lt;/Item&gt;&lt;Item index=&quot;0&quot;&gt;&lt;Size&gt;1000&lt;/Size&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/Column&gt;&lt;RowHeaderColumn class=&quot;FarPoint.Web.Spread.Model.DefaultSheetAxisModel&quot; defaultSize=&quot;40&quot; orientation=&quot;Horizontal&quot; count=&quot;1&quot;&gt;&lt;Items&gt;&lt;Item index=&quot;-1&quot;&gt;&lt;SortIndicator&gt;Ascending&lt;/SortIndicator&gt;&lt;Size&gt;40&lt;/Size&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/RowHeaderColumn&gt;&lt;ColumnHeaderRow class=&quot;FarPoint.Web.Spread.Model.DefaultSheetAxisModel&quot; defaultSize=&quot;22&quot; orientation=&quot;Vertical&quot; count=&quot;1&quot;&gt;&lt;Items&gt;&lt;Item index=&quot;-1&quot;&gt;&lt;Size&gt;22&lt;/Size&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/ColumnHeaderRow&gt;&lt;ColumnFooterRow class=&quot;FarPoint.Web.Spread.Model.DefaultSheetAxisModel&quot; defaultSize=&quot;22&quot; orientation=&quot;Vertical&quot; count=&quot;1&quot;&gt;&lt;Items&gt;&lt;Item index=&quot;-1&quot;&gt;&lt;Size&gt;22&lt;/Size&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/ColumnFooterRow&gt;&lt;/AxisModels&gt;&lt;StyleModels&gt;&lt;RowHeader class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;1&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;DefaultStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;RowHeaderDefault&quot; /&gt;&lt;ConditionalFormatCollections /&gt;&lt;/RowHeader&gt;&lt;ColumnHeader class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;1&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;DefaultStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;ColumnHeaderDefault&quot;&gt;&lt;Background class=&quot;FarPoint.Web.Spread.Background&quot;&gt;&lt;BackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chbg.gif&lt;/BackgroundImageUrl&gt;&lt;SelectedBackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chm.png&lt;/SelectedBackgroundImageUrl&gt;&lt;/Background&gt;&lt;/DefaultStyle&gt;&lt;ConditionalFormatCollections /&gt;&lt;/ColumnHeader&gt;&lt;DataArea class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;1&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;DefaultStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;DataAreaDefault&quot; /&gt;&lt;ConditionalFormatCollections /&gt;&lt;/DataArea&gt;&lt;SheetCorner class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;1&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;DefaultStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;CornerDefault&quot;&gt;&lt;Background class=&quot;FarPoint.Web.Spread.Background&quot;&gt;&lt;BackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chbg.gif&lt;/BackgroundImageUrl&gt;&lt;SelectedBackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chm.png&lt;/SelectedBackgroundImageUrl&gt;&lt;/Background&gt;&lt;/DefaultStyle&gt;&lt;ConditionalFormatCollections /&gt;&lt;/SheetCorner&gt;&lt;ColumnFooter class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;1&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;DefaultStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;ColumnFooterDefault&quot; /&gt;&lt;ConditionalFormatCollections /&gt;&lt;/ColumnFooter&gt;&lt;/StyleModels&gt;&lt;MessageRowStyle class=&quot;FarPoint.Web.Spread.Appearance&quot;&gt;&lt;BackColor&gt;LightYellow&lt;/BackColor&gt;&lt;ForeColor&gt;Red&lt;/ForeColor&gt;&lt;/MessageRowStyle&gt;&lt;SheetCornerStyle class=&quot;FarPoint.Web.Spread.NamedStyle&quot; Parent=&quot;CornerDefault&quot;&gt;&lt;Background class=&quot;FarPoint.Web.Spread.Background&quot;&gt;&lt;BackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chbg.gif&lt;/BackgroundImageUrl&gt;&lt;SelectedBackgroundImageUrl&gt;SPREADCLIENTPATH:/img/chm.png&lt;/SelectedBackgroundImageUrl&gt;&lt;/Background&gt;&lt;/SheetCornerStyle&gt;&lt;AllowLoadOnDemand&gt;false&lt;/AllowLoadOnDemand&gt;&lt;LoadRowIncrement &gt;10&lt;/LoadRowIncrement &gt;&lt;LoadInitRowCount &gt;30&lt;/LoadInitRowCount &gt;&lt;LoadOnDemandMode &gt;Standard&lt;/LoadOnDemandMode &gt;&lt;LoadOnDemandInterval &gt;500&lt;/LoadOnDemandInterval &gt;&lt;LoadOnDemandTriggerMode &gt;Timed&lt;/LoadOnDemandTriggerMode &gt;&lt;LoadOffsetFromBottom &gt;0&lt;/LoadOffsetFromBottom &gt;&lt;AllowVirtualScrollPaging&gt;false&lt;/AllowVirtualScrollPaging&gt;&lt;VirtualScrollPagingPrevRowCount&gt;0&lt;/VirtualScrollPagingPrevRowCount&gt;&lt;VirtualScrollPagingFormatString&gt;第{page}页 共{count}页&lt;/VirtualScrollPagingFormatString&gt;&lt;TopRow&gt;0&lt;/TopRow&gt;&lt;PreviewRowStyle class=&quot;FarPoint.Web.Spread.PreviewRowInfo&quot; /&gt;&lt;FilterBar class=&quot;FarPoint.Web.Spread.FilterBar&quot;&gt;&lt;Height&gt;22&lt;/Height&gt;&lt;IndicatorCssClass /&gt;&lt;Style class=&quot;FarPoint.Web.Spread.Model.DefaultSheetStyleModel&quot; Rows=&quot;2&quot; Columns=&quot;1&quot;&gt;&lt;AltRowCount&gt;2&lt;/AltRowCount&gt;&lt;RowStyles&gt;&lt;RowStyle Index=&quot;0&quot; class=&quot;FarPoint.Web.Spread.FilterBarStyleInfo&quot; Parent=&quot;FilterBarDefault&quot; /&gt;&lt;RowStyle Index=&quot;1&quot; class=&quot;FarPoint.Web.Spread.FilterBarStyleInfo&quot; Parent=&quot;RowHeaderDefault&quot;&gt;&lt;HorizontalAlign&gt;Center&lt;/HorizontalAlign&gt;&lt;VerticalAlign&gt;Middle&lt;/VerticalAlign&gt;&lt;/RowStyle&gt;&lt;/RowStyles&gt;&lt;ConditionalFormatCollections /&gt;&lt;/Style&gt;&lt;/FilterBar&gt;&lt;/Presentation&gt;&lt;Settings&gt;&lt;Name&gt;Sheet1&lt;/Name&gt;&lt;Categories&gt;&lt;Appearance&gt;&lt;GridLineColor&gt;#d0d7e5&lt;/GridLineColor&gt;&lt;SelectionBackColor&gt;#eaecf5&lt;/SelectionBackColor&gt;&lt;SelectionBorder class=&quot;FarPoint.Web.Spread.Border&quot; /&gt;&lt;/Appearance&gt;&lt;Behavior&gt;&lt;EditTemplateColumnCount&gt;2&lt;/EditTemplateColumnCount&gt;&lt;GroupBarText&gt;拖放一个列以便按照该列进行分组。&lt;/GroupBarText&gt;&lt;/Behavior&gt;&lt;Layout&gt;&lt;ColumnCount&gt;1&lt;/ColumnCount&gt;&lt;RowCount&gt;1&lt;/RowCount&gt;&lt;ColumnHeaderRowCount&gt;1&lt;/ColumnHeaderRowCount&gt;&lt;RowHeaderColumnCount&gt;1&lt;/RowHeaderColumnCount&gt;&lt;/Layout&gt;&lt;/Categories&gt;&lt;ActiveRow&gt;0&lt;/ActiveRow&gt;&lt;ActiveColumn&gt;0&lt;/ActiveColumn&gt;&lt;ColumnHeaderRowCount&gt;1&lt;/ColumnHeaderRowCount&gt;&lt;ColumnFooterRowCount&gt;1&lt;/ColumnFooterRowCount&gt;&lt;PrintInfo&gt;&lt;Header /&gt;&lt;Footer /&gt;&lt;ZoomFactor&gt;0&lt;/ZoomFactor&gt;&lt;FirstPageNumber&gt;1&lt;/FirstPageNumber&gt;&lt;Orientation&gt;Auto&lt;/Orientation&gt;&lt;PrintType&gt;All&lt;/PrintType&gt;&lt;PageOrder&gt;Auto&lt;/PageOrder&gt;&lt;BestFitCols&gt;False&lt;/BestFitCols&gt;&lt;BestFitRows&gt;False&lt;/BestFitRows&gt;&lt;PageStart&gt;-1&lt;/PageStart&gt;&lt;PageEnd&gt;-1&lt;/PageEnd&gt;&lt;ColStart&gt;-1&lt;/ColStart&gt;&lt;ColEnd&gt;-1&lt;/ColEnd&gt;&lt;RowStart&gt;-1&lt;/RowStart&gt;&lt;RowEnd&gt;-1&lt;/RowEnd&gt;&lt;ShowBorder&gt;True&lt;/ShowBorder&gt;&lt;ShowGrid&gt;True&lt;/ShowGrid&gt;&lt;ShowColor&gt;True&lt;/ShowColor&gt;&lt;ShowColumnHeader&gt;Inherit&lt;/ShowColumnHeader&gt;&lt;ShowRowHeader&gt;Inherit&lt;/ShowRowHeader&gt;&lt;ShowFilterBar&gt;Inherit&lt;/ShowFilterBar&gt;&lt;ShowColumnFooter&gt;Inherit&lt;/ShowColumnFooter&gt;&lt;ShowColumnFooterEachPage&gt;True&lt;/ShowColumnFooterEachPage&gt;&lt;ShowTitle&gt;True&lt;/ShowTitle&gt;&lt;ShowSubtitle&gt;True&lt;/ShowSubtitle&gt;&lt;UseMax&gt;True&lt;/UseMax&gt;&lt;UseSmartPrint&gt;False&lt;/UseSmartPrint&gt;&lt;Opacity&gt;255&lt;/Opacity&gt;&lt;PrintNotes&gt;None&lt;/PrintNotes&gt;&lt;Centering&gt;None&lt;/Centering&gt;&lt;RepeatColStart&gt;-1&lt;/RepeatColStart&gt;&lt;RepeatColEnd&gt;-1&lt;/RepeatColEnd&gt;&lt;RepeatRowStart&gt;-1&lt;/RepeatRowStart&gt;&lt;RepeatRowEnd&gt;-1&lt;/RepeatRowEnd&gt;&lt;SmartPrintPagesTall&gt;1&lt;/SmartPrintPagesTall&gt;&lt;SmartPrintPagesWide&gt;1&lt;/SmartPrintPagesWide&gt;&lt;HeaderHeight&gt;-1&lt;/HeaderHeight&gt;&lt;FooterHeight&gt;-1&lt;/FooterHeight&gt;&lt;/PrintInfo&gt;&lt;TitleInfo class=&quot;FarPoint.Web.Spread.TitleInfo&quot;&gt;&lt;Style class=&quot;FarPoint.Web.Spread.StyleInfo&quot;&gt;&lt;BackColor&gt;#e7eff7&lt;/BackColor&gt;&lt;HorizontalAlign&gt;Right&lt;/HorizontalAlign&gt;&lt;/Style&gt;&lt;/TitleInfo&gt;&lt;WorksheetTemplate class=&quot;FarPoint.Web.Spread.WorksheetTemplate&quot;&gt;&lt;Layout&gt;&lt;ColumnCount&gt;4&lt;/ColumnCount&gt;&lt;/Layout&gt;&lt;AxisModels&gt;&lt;LayoutColumn class=&quot;FarPoint.Web.Spread.Model.DefaultSheetAxisModel&quot; orientation=&quot;Horizontal&quot; count=&quot;4&quot;&gt;&lt;Items&gt;&lt;Item index=&quot;-1&quot;&gt;&lt;SortIndicator&gt;Ascending&lt;/SortIndicator&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/LayoutColumn&gt;&lt;/AxisModels&gt;&lt;Data&gt;&lt;LayoutData class=&quot;FarPoint.Web.Spread.Model.DefaultSheetDataModel&quot; rows=&quot;1&quot; columns=&quot;4&quot;&gt;&lt;AutoCalculation&gt;True&lt;/AutoCalculation&gt;&lt;AutoGenerateColumns&gt;True&lt;/AutoGenerateColumns&gt;&lt;ReferenceStyle&gt;A1&lt;/ReferenceStyle&gt;&lt;Iteration&gt;False&lt;/Iteration&gt;&lt;MaximumIterations&gt;1&lt;/MaximumIterations&gt;&lt;MaximumChange&gt;0.001&lt;/MaximumChange&gt;&lt;Cells&gt;&lt;Cell row=&quot;0&quot; column=&quot;0&quot;&gt;&lt;Data type=&quot;System.Int32&quot;&gt;0&lt;/Data&gt;&lt;/Cell&gt;&lt;Cell row=&quot;0&quot; column=&quot;1&quot;&gt;&lt;Data type=&quot;System.Int32&quot;&gt;1&lt;/Data&gt;&lt;/Cell&gt;&lt;Cell row=&quot;0&quot; column=&quot;2&quot;&gt;&lt;Data type=&quot;System.Int32&quot;&gt;2&lt;/Data&gt;&lt;/Cell&gt;&lt;Cell row=&quot;0&quot; column=&quot;3&quot;&gt;&lt;Data type=&quot;System.Int32&quot;&gt;3&lt;/Data&gt;&lt;/Cell&gt;&lt;/Cells&gt;&lt;/LayoutData&gt;&lt;/Data&gt;&lt;/WorksheetTemplate&gt;&lt;LayoutMode&gt;CellLayoutMode&lt;/LayoutMode&gt;&lt;AutoFilterMode&gt;FilterGadget&lt;/AutoFilterMode&gt;&lt;CurrentPageIndex type=&quot;System.Int32&quot;&gt;0&lt;/CurrentPageIndex&gt;&lt;/Settings&gt;&lt;/Sheet&gt;">
                                    </FarPoint:SheetView>
                                </Sheets>
                    <TouchStrips>
                    <FarPoint:TouchStrip Area="Chart" NoTouchStrip="True"></FarPoint:TouchStrip>
                    </TouchStrips>

                    <TitleInfo BackColor="#E7EFF7" ForeColor="" HorizontalAlign="Center" VerticalAlign="NotSet" 
                                    Font-Size="X-Large" Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                    Font-Strikeout="False" Font-Underline="False"></TitleInfo>
                            </FarPoint:FpSpread>
                     </div>
                </td>
                </tr>
                </table>

    </form>
    <script language="javascript" type="text/javascript">

    </script>
</body>
</html>

